<html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers" data-namespace-typo3-fluid="true">
  <f:layout name="Default" />

  This template displays a EDIT form for the current domain object.

  If you modify this template, do not forget to change the overwrite settings
  in /Configuration/ExtensionBuilder/settings.yaml:
    Resources:
      Private:
        Templates:
          Edit.html: keep

  Otherwise your changes will be overwritten the next time you save the extension in the extension builder

  <f:section name="content">
    <f:flashMessages />
    <f:render partial="FormErrors" />

	<div class="portlet light form">
	    <f:form class="form-horizontal" id="id_teamlist_team" action="update" name="team" object="{team}" enctype="multipart/form-data">
			<fieldset>
				<div class="portlet-title">
					<legend>修改信息</legend>
				</div>
	            <div class="portlet-body">
	            	<div class="form-body">
		                <f:render partial="Team/FormFields" arguments="{_all}"/>
		            </div>
	            </div>
	            <div class="form-buttons">
					<f:form.submit class="btn btn-success" value="修改" />
					<f:link.action action="listback" class="btn btn-default">返回列表</f:link.action>
	            </div>
			</fieldset>
		</f:form>
	</div>
	<script>
	
		$("#id_teamlist_team").validate({
			errorElement: "span",
			rules: {
				'tx_teamlist_teamwork[team][name]': {
					required: true
			　　 },
				'tx_teamlist_teamwork[team][intro]': {
					required: true
			　　},
				'tx_teamlist_teamwork[team][detail]': {
					required: true
				},
				'tx_teamlist_teamwork[image]': {
					imagecheck: true
				}
	
			},
			messages: {
				'tx_teamlist_teamwork[team][name]': {
					required: "请输入姓名！"
			　　},
				'tx_teamlist_teamwork[team][intro]': {
					required: "请填写简介!"
				},
				'tx_teamlist_teamwork[team][detail]': {
					required: "请填写详情!"
				},
				'tx_teamlist_teamwork[image]': {
					imagecheck: "请上传照片!"
				}
			}
	    });
	
		jQuery.validator.addMethod("imagecheck", function(value, element) {
		    var cover = true;
		    var pt = "{team.image}";
		    if((pt=="" || pt==null)){
		    	if(value=="" || value == null){cover=false;}
		    }
		    return cover;
		}, "请上传个人图片!");
	</script>
  </f:section>
</html>